home *** CD-ROM | disk | FTP | other *** search
- Path: news.eecs.umich.edu!usenet
- From: niranjan@eecs.umich.edu (Niranjan Ramakrishnan)
- Newsgroups: comp.lang.c
- Subject: simulating fscanf for strings?
- Date: 18 Apr 1996 14:38:35 -0400
- Organization: Department of EECS, University of Michigan, Ann Arbor
- Sender: niranjan@wits-end.eecs.umich.edu
- Message-ID: <ief20llwf6c.fsf@wits-end.eecs.umich.edu>
- NNTP-Posting-Host: wits-end.eecs.umich.edu
- X-Newsreader: Gnus v5.1
-
- Hi,
-
- Does anyone know of a method to simulate what fscanf does (in the case of
- a file pointer) in a character pointer? The only closest thing available is
- sscanf but it doesn't automatically advance the pointer past the number of
- bytes read. Also it doesn't return the number of bytes read either so I'm
- unable to advance the pointer using a simple +=sscanf() call. What I want,
- basically, is a function that does exactly what fscanf does except that it
- takes a char * arg instead of a FILE *. Is this possible at all?
-
- Any advice will be deeply appreciated.
-
- Thanx,
-
- Niranjan
-
- --
- - Niranjan
-
-